package com.eee.xiang.market.beans;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TCargoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public TCargoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCargoIdIsNull() {
            addCriterion("cargo_id is null");
            return (Criteria) this;
        }

        public Criteria andCargoIdIsNotNull() {
            addCriterion("cargo_id is not null");
            return (Criteria) this;
        }

        public Criteria andCargoIdEqualTo(String value) {
            addCriterion("cargo_id =", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdNotEqualTo(String value) {
            addCriterion("cargo_id <>", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdGreaterThan(String value) {
            addCriterion("cargo_id >", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdGreaterThanOrEqualTo(String value) {
            addCriterion("cargo_id >=", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdLessThan(String value) {
            addCriterion("cargo_id <", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdLessThanOrEqualTo(String value) {
            addCriterion("cargo_id <=", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdLike(String value) {
            addCriterion("cargo_id like", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdNotLike(String value) {
            addCriterion("cargo_id not like", value, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdIn(List<String> values) {
            addCriterion("cargo_id in", values, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdNotIn(List<String> values) {
            addCriterion("cargo_id not in", values, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdBetween(String value1, String value2) {
            addCriterion("cargo_id between", value1, value2, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoIdNotBetween(String value1, String value2) {
            addCriterion("cargo_id not between", value1, value2, "cargoId");
            return (Criteria) this;
        }

        public Criteria andCargoNameIsNull() {
            addCriterion("cargo_name is null");
            return (Criteria) this;
        }

        public Criteria andCargoNameIsNotNull() {
            addCriterion("cargo_name is not null");
            return (Criteria) this;
        }

        public Criteria andCargoNameEqualTo(String value) {
            addCriterion("cargo_name =", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameNotEqualTo(String value) {
            addCriterion("cargo_name <>", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameGreaterThan(String value) {
            addCriterion("cargo_name >", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameGreaterThanOrEqualTo(String value) {
            addCriterion("cargo_name >=", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameLessThan(String value) {
            addCriterion("cargo_name <", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameLessThanOrEqualTo(String value) {
            addCriterion("cargo_name <=", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameLike(String value) {
            addCriterion("cargo_name like", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameNotLike(String value) {
            addCriterion("cargo_name not like", value, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameIn(List<String> values) {
            addCriterion("cargo_name in", values, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameNotIn(List<String> values) {
            addCriterion("cargo_name not in", values, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameBetween(String value1, String value2) {
            addCriterion("cargo_name between", value1, value2, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoNameNotBetween(String value1, String value2) {
            addCriterion("cargo_name not between", value1, value2, "cargoName");
            return (Criteria) this;
        }

        public Criteria andCargoPriceIsNull() {
            addCriterion("cargo_price is null");
            return (Criteria) this;
        }

        public Criteria andCargoPriceIsNotNull() {
            addCriterion("cargo_price is not null");
            return (Criteria) this;
        }

        public Criteria andCargoPriceEqualTo(BigDecimal value) {
            addCriterion("cargo_price =", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceNotEqualTo(BigDecimal value) {
            addCriterion("cargo_price <>", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceGreaterThan(BigDecimal value) {
            addCriterion("cargo_price >", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("cargo_price >=", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceLessThan(BigDecimal value) {
            addCriterion("cargo_price <", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("cargo_price <=", value, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceIn(List<BigDecimal> values) {
            addCriterion("cargo_price in", values, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceNotIn(List<BigDecimal> values) {
            addCriterion("cargo_price not in", values, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cargo_price between", value1, value2, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cargo_price not between", value1, value2, "cargoPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceIsNull() {
            addCriterion("cargo_retail_price is null");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceIsNotNull() {
            addCriterion("cargo_retail_price is not null");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceEqualTo(BigDecimal value) {
            addCriterion("cargo_retail_price =", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceNotEqualTo(BigDecimal value) {
            addCriterion("cargo_retail_price <>", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceGreaterThan(BigDecimal value) {
            addCriterion("cargo_retail_price >", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceGreaterThanOrEqualTo(BigDecimal value) {
            addCriterion("cargo_retail_price >=", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceLessThan(BigDecimal value) {
            addCriterion("cargo_retail_price <", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceLessThanOrEqualTo(BigDecimal value) {
            addCriterion("cargo_retail_price <=", value, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceIn(List<BigDecimal> values) {
            addCriterion("cargo_retail_price in", values, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceNotIn(List<BigDecimal> values) {
            addCriterion("cargo_retail_price not in", values, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cargo_retail_price between", value1, value2, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoRetailPriceNotBetween(BigDecimal value1, BigDecimal value2) {
            addCriterion("cargo_retail_price not between", value1, value2, "cargoRetailPrice");
            return (Criteria) this;
        }

        public Criteria andCargoNumIsNull() {
            addCriterion("cargo_num is null");
            return (Criteria) this;
        }

        public Criteria andCargoNumIsNotNull() {
            addCriterion("cargo_num is not null");
            return (Criteria) this;
        }

        public Criteria andCargoNumEqualTo(Integer value) {
            addCriterion("cargo_num =", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumNotEqualTo(Integer value) {
            addCriterion("cargo_num <>", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumGreaterThan(Integer value) {
            addCriterion("cargo_num >", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumGreaterThanOrEqualTo(Integer value) {
            addCriterion("cargo_num >=", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumLessThan(Integer value) {
            addCriterion("cargo_num <", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumLessThanOrEqualTo(Integer value) {
            addCriterion("cargo_num <=", value, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumIn(List<Integer> values) {
            addCriterion("cargo_num in", values, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumNotIn(List<Integer> values) {
            addCriterion("cargo_num not in", values, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumBetween(Integer value1, Integer value2) {
            addCriterion("cargo_num between", value1, value2, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andCargoNumNotBetween(Integer value1, Integer value2) {
            addCriterion("cargo_num not between", value1, value2, "cargoNum");
            return (Criteria) this;
        }

        public Criteria andExpireTimeIsNull() {
            addCriterion("expire_time is null");
            return (Criteria) this;
        }

        public Criteria andExpireTimeIsNotNull() {
            addCriterion("expire_time is not null");
            return (Criteria) this;
        }

        public Criteria andExpireTimeEqualTo(Date value) {
            addCriterion("expire_time =", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeNotEqualTo(Date value) {
            addCriterion("expire_time <>", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeGreaterThan(Date value) {
            addCriterion("expire_time >", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("expire_time >=", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeLessThan(Date value) {
            addCriterion("expire_time <", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeLessThanOrEqualTo(Date value) {
            addCriterion("expire_time <=", value, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeIn(List<Date> values) {
            addCriterion("expire_time in", values, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeNotIn(List<Date> values) {
            addCriterion("expire_time not in", values, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeBetween(Date value1, Date value2) {
            addCriterion("expire_time between", value1, value2, "expireTime");
            return (Criteria) this;
        }

        public Criteria andExpireTimeNotBetween(Date value1, Date value2) {
            addCriterion("expire_time not between", value1, value2, "expireTime");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIsNull() {
            addCriterion("delete_flag is null");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIsNotNull() {
            addCriterion("delete_flag is not null");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagEqualTo(Short value) {
            addCriterion("delete_flag =", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotEqualTo(Short value) {
            addCriterion("delete_flag <>", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagGreaterThan(Short value) {
            addCriterion("delete_flag >", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagGreaterThanOrEqualTo(Short value) {
            addCriterion("delete_flag >=", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagLessThan(Short value) {
            addCriterion("delete_flag <", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagLessThanOrEqualTo(Short value) {
            addCriterion("delete_flag <=", value, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagIn(List<Short> values) {
            addCriterion("delete_flag in", values, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotIn(List<Short> values) {
            addCriterion("delete_flag not in", values, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagBetween(Short value1, Short value2) {
            addCriterion("delete_flag between", value1, value2, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andDeleteFlagNotBetween(Short value1, Short value2) {
            addCriterion("delete_flag not between", value1, value2, "deleteFlag");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNull() {
            addCriterion("create_datetime is null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIsNotNull() {
            addCriterion("create_datetime is not null");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeEqualTo(Date value) {
            addCriterion("create_datetime =", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotEqualTo(Date value) {
            addCriterion("create_datetime <>", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThan(Date value) {
            addCriterion("create_datetime >", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeGreaterThanOrEqualTo(Date value) {
            addCriterion("create_datetime >=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThan(Date value) {
            addCriterion("create_datetime <", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeLessThanOrEqualTo(Date value) {
            addCriterion("create_datetime <=", value, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeIn(List<Date> values) {
            addCriterion("create_datetime in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotIn(List<Date> values) {
            addCriterion("create_datetime not in", values, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeBetween(Date value1, Date value2) {
            addCriterion("create_datetime between", value1, value2, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCreateDatetimeNotBetween(Date value1, Date value2) {
            addCriterion("create_datetime not between", value1, value2, "createDatetime");
            return (Criteria) this;
        }

        public Criteria andCargoUrlIsNull() {
            addCriterion("cargo_url is null");
            return (Criteria) this;
        }

        public Criteria andCargoUrlIsNotNull() {
            addCriterion("cargo_url is not null");
            return (Criteria) this;
        }

        public Criteria andCargoUrlEqualTo(String value) {
            addCriterion("cargo_url =", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlNotEqualTo(String value) {
            addCriterion("cargo_url <>", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlGreaterThan(String value) {
            addCriterion("cargo_url >", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlGreaterThanOrEqualTo(String value) {
            addCriterion("cargo_url >=", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlLessThan(String value) {
            addCriterion("cargo_url <", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlLessThanOrEqualTo(String value) {
            addCriterion("cargo_url <=", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlLike(String value) {
            addCriterion("cargo_url like", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlNotLike(String value) {
            addCriterion("cargo_url not like", value, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlIn(List<String> values) {
            addCriterion("cargo_url in", values, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlNotIn(List<String> values) {
            addCriterion("cargo_url not in", values, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlBetween(String value1, String value2) {
            addCriterion("cargo_url between", value1, value2, "cargoUrl");
            return (Criteria) this;
        }

        public Criteria andCargoUrlNotBetween(String value1, String value2) {
            addCriterion("cargo_url not between", value1, value2, "cargoUrl");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}